<?php

namespace App\Imports;


use Maatwebsite\Excel\Concerns\WithMultipleSheets;

class MultipleImport implements WithMultipleSheets
{
    public $sheet;
    public $sheetCount;

    /**
     * UserImport constructor.
     * @param int $sheetCount sheet数量
     */
    public function __construct($sheetCount)
    {
        $this->sheetCount = $sheetCount;
    }

    public function sheets(): array
    {
        for ($i = 0; $i < $this->sheetCount; $i++) {
            $this->sheet[$i] = new PriceImport();
        }
        return $this->sheet;
    }
}
